package com.hellogood.yaohuo.client.common;

import java.util.LinkedHashMap;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.grid.ListGrid;

public class ColorAsyncCallback implements AsyncCallback<LinkedHashMap<String, String>> {
	private ListGrid listGrid = null;

	public ColorAsyncCallback(ListGrid listGrid) {
		this.listGrid = listGrid;
	}

	@Override
	public void onFailure(Throwable caught) {
		SC.say(caught.getMessage());
	}

	@Override
	public void onSuccess(LinkedHashMap<String, String> result) {
		if (result != null) {
			listGrid.setValueMap("color", result);
		}
	}
}